<?php
/**
 * Created by PhpStorm.
 * User: fuyu
 * Date: 2018/6/5
 * Time: 上午9:36
 */

function jsonCode ($code,$message,$data=null)
{
    return response()->json(['code'=>$code,'message'=>$message,'data'=>$data]);
}

function jsonSuccess ($message,$data=null)
{
    return jsonCode(0,$message,$data);
}

function jsonFail ($message,$data=null)
{
    return jsonCode(1,$message,$data);
}